-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Linear Map for Cargo 1.71 #376
Conversation
This patch isn't correct. Like the new code says, struct S;
impl Drop for S {
fn drop(&mut self) {
println!("dropped an S");
}
}
fn main() {
let mut v = heapless::LinearMap::<&str, S, 5>::new();
v.insert("a", S).ok().unwrap();
} It will print "dropped an S" twice with the PR. Just removing the |
I did notice it continued to work when the entire |
There seems to be something wrong with the commits here, perhaps a I made a separate PR to fix in #388 |
cool yeah this PR desperately needed a rebase |
fixed in #388 |
Motivation
In the latest version of Cargo the implementation of
Drop
for linear map does not compile.Changes
Revert
Drop
impl to previous implementation.